<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Class template unordered_set</title>
<link rel="stylesheet" href="../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
<link rel="up" href="../unordered/reference.html#header.boost.unordered_set_hpp" title="Header &lt;boost/unordered_set.hpp&gt;">
<link rel="prev" href="unordered/node_handle_set.html" title="Class template node_handle_set">
<link rel="next" href="unordered_multiset.html" title="Class template unordered_multiset">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../boost.png"></td>
<td align="center"><a href="../../../index.html">Home</a></td>
<td align="center"><a href="../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="unordered/node_handle_set.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../unordered/reference.html#header.boost.unordered_set_hpp"><img src="../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="unordered_multiset.html"><img src="../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="refentry">
<a name="boost.unordered_set"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2><span class="refentrytitle">Class template unordered_set</span></h2>
<p>boost::unordered_set — 
            An unordered associative container that stores unique values.
          </p>
</div>
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../unordered/reference.html#header.boost.unordered_set_hpp" title="Header &lt;boost/unordered_set.hpp&gt;">boost/unordered_set.hpp</a>&gt;

</span><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Value<span class="special">,</span> <span class="keyword">typename</span> Hash <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">hash</span><span class="special">&lt;</span><span class="identifier">Value</span><span class="special">&gt;</span><span class="special">,</span> 
         <span class="keyword">typename</span> Pred <span class="special">=</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">equal_to</span><span class="special">&lt;</span><span class="identifier">Value</span><span class="special">&gt;</span><span class="special">,</span> 
         <span class="keyword">typename</span> Alloc <span class="special">=</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">allocator</span><span class="special">&lt;</span><span class="identifier">Value</span><span class="special">&gt;</span> <span class="special">&gt;</span> 
<span class="keyword">class</span> <a class="link" href="unordered_set.html" title="Class template unordered_set">unordered_set</a> <span class="special">{</span>
<span class="keyword">public</span><span class="special">:</span>
  <span class="comment">// <a class="link" href="unordered_set.html#boost.unordered_settypes">types</a></span>
  <span class="keyword">typedef</span> <span class="identifier">Value</span>                                  <a name="boost.unordered_set.key_type"></a><span class="identifier">key_type</span><span class="special">;</span>            
  <span class="keyword">typedef</span> <span class="identifier">Value</span>                                  <a name="boost.unordered_set.value_type"></a><span class="identifier">value_type</span><span class="special">;</span>          
  <span class="keyword">typedef</span> <span class="identifier">Hash</span>                                   <a name="boost.unordered_set.hasher"></a><span class="identifier">hasher</span><span class="special">;</span>              
  <span class="keyword">typedef</span> <span class="identifier">Pred</span>                                   <a name="boost.unordered_set.key_equal"></a><span class="identifier">key_equal</span><span class="special">;</span>           
  <span class="keyword">typedef</span> <span class="identifier">Alloc</span>                                  <a name="boost.unordered_set.allocator_type"></a><span class="identifier">allocator_type</span><span class="special">;</span>      
  <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">allocator_type</span><span class="special">::</span><span class="identifier">pointer</span>       <a class="link" href="unordered_set.html#boost.unordered_set.pointer"><span class="identifier">pointer</span></a><span class="special">;</span>             
  <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">allocator_type</span><span class="special">::</span><span class="identifier">const_pointer</span> <a class="link" href="unordered_set.html#boost.unordered_set.const_pointer"><span class="identifier">const_pointer</span></a><span class="special">;</span>       
  <span class="keyword">typedef</span> <span class="identifier">value_type</span><span class="special">&amp;</span>                            <a name="boost.unordered_set.reference"></a><span class="identifier">reference</span><span class="special">;</span>             <span class="comment">// lvalue of value_type.</span>
  <span class="keyword">typedef</span> <span class="identifier">value_type</span> <span class="keyword">const</span><span class="special">&amp;</span>                      <a name="boost.unordered_set.const_reference"></a><span class="identifier">const_reference</span><span class="special">;</span>       <span class="comment">// const lvalue of value_type.</span>
  <span class="keyword">typedef</span> <span class="emphasis"><em><span class="identifier">implementation</span><span class="special">-</span><span class="identifier">defined</span></em></span>                 <a class="link" href="unordered_set.html#boost.unordered_set.size_type"><span class="identifier">size_type</span></a><span class="special">;</span>           
  <span class="keyword">typedef</span> <span class="emphasis"><em><span class="identifier">implementation</span><span class="special">-</span><span class="identifier">defined</span></em></span>                 <a class="link" href="unordered_set.html#boost.unordered_set.difference_type"><span class="identifier">difference_type</span></a><span class="special">;</span>     
  <span class="keyword">typedef</span> <span class="emphasis"><em><span class="identifier">implementation</span><span class="special">-</span><span class="identifier">defined</span></em></span>                 <a class="link" href="unordered_set.html#boost.unordered_set.iterator"><span class="identifier">iterator</span></a><span class="special">;</span>            
  <span class="keyword">typedef</span> <span class="emphasis"><em><span class="identifier">implementation</span><span class="special">-</span><span class="identifier">defined</span></em></span>                 <a class="link" href="unordered_set.html#boost.unordered_set.const_iterator"><span class="identifier">const_iterator</span></a><span class="special">;</span>      
  <span class="keyword">typedef</span> <span class="emphasis"><em><span class="identifier">implementation</span><span class="special">-</span><span class="identifier">defined</span></em></span>                 <a class="link" href="unordered_set.html#boost.unordered_set.local_iterator"><span class="identifier">local_iterator</span></a><span class="special">;</span>      
  <span class="keyword">typedef</span> <span class="emphasis"><em><span class="identifier">implementation</span><span class="special">-</span><span class="identifier">defined</span></em></span>                 <a class="link" href="unordered_set.html#boost.unordered_set.const_local_iterator"><span class="identifier">const_local_iterator</span></a><span class="special">;</span>
  <span class="keyword">typedef</span> <span class="emphasis"><em><span class="identifier">implementation</span><span class="special">-</span><span class="identifier">defined</span></em></span>                 <a class="link" href="unordered_set.html#boost.unordered_set.node_type"><span class="identifier">node_type</span></a><span class="special">;</span>           
  <span class="keyword">typedef</span> <span class="emphasis"><em><span class="identifier">implementation</span><span class="special">-</span><span class="identifier">defined</span></em></span>                 <a class="link" href="unordered_set.html#boost.unordered_set.insert_return_type"><span class="identifier">insert_return_type</span></a><span class="special">;</span>  

  <span class="comment">// <a class="link" href="unordered_set.html#boost.unordered_setconstruct-copy-destruct">construct/copy/destruct</a></span>
  <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_21-bb"><span class="identifier">unordered_set</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">explicit</span> <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_22-bb"><span class="identifier">unordered_set</span></a><span class="special">(</span><span class="identifier">size_type</span><span class="special">,</span> <span class="identifier">hasher</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="special">=</span> <span class="identifier">hasher</span><span class="special">(</span><span class="special">)</span><span class="special">,</span> 
                         <span class="identifier">key_equal</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="special">=</span> <span class="identifier">key_equal</span><span class="special">(</span><span class="special">)</span><span class="special">,</span> 
                         <span class="identifier">allocator_type</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="special">=</span> <span class="identifier">allocator_type</span><span class="special">(</span><span class="special">)</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <a class="link" href="../InputIterator.html" title="Concept InputIterator">InputIterator</a><span class="special">&gt;</span> 
    <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_23-bb"><span class="identifier">unordered_set</span></a><span class="special">(</span><span class="identifier">InputIterator</span><span class="special">,</span> <span class="identifier">InputIterator</span><span class="special">,</span> 
                  <span class="identifier">size_type</span> <span class="special">=</span> <span class="emphasis"><em><span class="identifier">implementation</span><span class="special">-</span><span class="identifier">defined</span></em></span><span class="special">,</span> 
                  <span class="identifier">hasher</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="special">=</span> <span class="identifier">hasher</span><span class="special">(</span><span class="special">)</span><span class="special">,</span> <span class="identifier">key_equal</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="special">=</span> <span class="identifier">key_equal</span><span class="special">(</span><span class="special">)</span><span class="special">,</span> 
                  <span class="identifier">allocator_type</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="special">=</span> <span class="identifier">allocator_type</span><span class="special">(</span><span class="special">)</span><span class="special">)</span><span class="special">;</span>
  <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_24-bb"><span class="identifier">unordered_set</span></a><span class="special">(</span><span class="identifier">unordered_set</span> <span class="keyword">const</span><span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_25-bb"><span class="identifier">unordered_set</span></a><span class="special">(</span><span class="identifier">unordered_set</span> <span class="special">&amp;&amp;</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">explicit</span> <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_26-bb"><span class="identifier">unordered_set</span></a><span class="special">(</span><span class="identifier">Allocator</span> <span class="keyword">const</span><span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_27-bb"><span class="identifier">unordered_set</span></a><span class="special">(</span><span class="identifier">unordered_set</span> <span class="keyword">const</span><span class="special">&amp;</span><span class="special">,</span> <span class="identifier">Allocator</span> <span class="keyword">const</span><span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_28-bb"><span class="identifier">unordered_set</span></a><span class="special">(</span><span class="identifier">unordered_set</span> <span class="special">&amp;&amp;</span><span class="special">,</span> <span class="identifier">Allocator</span> <span class="keyword">const</span><span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_29-bb"><span class="identifier">unordered_set</span></a><span class="special">(</span><span class="identifier">initializer_list</span><span class="special">&lt;</span><span class="identifier">value_type</span><span class="special">&gt;</span><span class="special">,</span> 
                <span class="identifier">size_type</span> <span class="special">=</span> <span class="emphasis"><em><span class="identifier">implementation</span><span class="special">-</span><span class="identifier">defined</span></em></span><span class="special">,</span> <span class="identifier">hasher</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="special">=</span> <span class="identifier">hasher</span><span class="special">(</span><span class="special">)</span><span class="special">,</span> 
                <span class="identifier">key_equal</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="special">=</span> <span class="identifier">key_equal</span><span class="special">(</span><span class="special">)</span><span class="special">,</span> 
                <span class="identifier">allocator_type</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="special">=</span> <span class="identifier">allocator_type</span><span class="special">(</span><span class="special">)</span><span class="special">)</span><span class="special">;</span>
  <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_30-bb"><span class="identifier">unordered_set</span></a><span class="special">(</span><span class="identifier">size_type</span><span class="special">,</span> <span class="identifier">allocator_type</span> <span class="keyword">const</span><span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_31-bb"><span class="identifier">unordered_set</span></a><span class="special">(</span><span class="identifier">size_type</span><span class="special">,</span> <span class="identifier">hasher</span> <span class="keyword">const</span><span class="special">&amp;</span><span class="special">,</span> <span class="identifier">allocator_type</span> <span class="keyword">const</span><span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <a class="link" href="../InputIterator.html" title="Concept InputIterator">InputIterator</a><span class="special">&gt;</span> 
    <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_32-bb"><span class="identifier">unordered_set</span></a><span class="special">(</span><span class="identifier">InputIterator</span><span class="special">,</span> <span class="identifier">InputIterator</span><span class="special">,</span> <span class="identifier">size_type</span><span class="special">,</span> 
                  <span class="identifier">allocator_type</span> <span class="keyword">const</span><span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <a class="link" href="../InputIterator.html" title="Concept InputIterator">InputIterator</a><span class="special">&gt;</span> 
    <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_33-bb"><span class="identifier">unordered_set</span></a><span class="special">(</span><span class="identifier">InputIterator</span><span class="special">,</span> <span class="identifier">InputIterator</span><span class="special">,</span> <span class="identifier">size_type</span><span class="special">,</span> <span class="identifier">hasher</span> <span class="keyword">const</span><span class="special">&amp;</span><span class="special">,</span> 
                  <span class="identifier">allocator_type</span> <span class="keyword">const</span><span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_34-bb"><span class="special">~</span><span class="identifier">unordered_set</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
  <span class="identifier">unordered_set</span><span class="special">&amp;</span> <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_35-bb"><span class="keyword">operator</span><span class="special">=</span></a><span class="special">(</span><span class="identifier">unordered_set</span> <span class="keyword">const</span><span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <span class="identifier">unordered_set</span><span class="special">&amp;</span> <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_36-bb"><span class="keyword">operator</span><span class="special">=</span></a><span class="special">(</span><span class="identifier">unordered_set</span> <span class="special">&amp;&amp;</span><span class="special">)</span><span class="special">;</span>
  <span class="identifier">unordered_set</span><span class="special">&amp;</span> <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_37-bb"><span class="keyword">operator</span><span class="special">=</span></a><span class="special">(</span><span class="identifier">initializer_list</span><span class="special">&lt;</span><span class="identifier">value_type</span><span class="special">&gt;</span><span class="special">)</span><span class="special">;</span>
  <span class="identifier">allocator_type</span> <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_38-bb"><span class="identifier">get_allocator</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>

  <span class="comment">// <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_39-bb">size and capacity</a></span>
  <span class="keyword">bool</span> <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_39_1-bb"><span class="identifier">empty</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="identifier">size_type</span> <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_39_2-bb"><span class="identifier">size</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="identifier">size_type</span> <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_39_3-bb"><span class="identifier">max_size</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>

  <span class="comment">// <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_40-bb">iterators</a></span>
  <span class="identifier">iterator</span> <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_40_1_1-bb"><span class="identifier">begin</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
  <span class="identifier">const_iterator</span> <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_40_1_2-bb"><span class="identifier">begin</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="identifier">iterator</span> <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_40_2_1-bb"><span class="identifier">end</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
  <span class="identifier">const_iterator</span> <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_40_2_2-bb"><span class="identifier">end</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="identifier">const_iterator</span> <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_40_3-bb"><span class="identifier">cbegin</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="identifier">const_iterator</span> <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_40_4-bb"><span class="identifier">cend</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>

  <span class="comment">// <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_41-bb">modifiers</a></span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span><span class="special">...</span> Args<span class="special">&gt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">iterator</span><span class="special">,</span> <span class="keyword">bool</span><span class="special">&gt;</span> <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_41_1-bb"><span class="identifier">emplace</span></a><span class="special">(</span><span class="identifier">Args</span><span class="special">&amp;&amp;</span><span class="special">...</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span><span class="special">...</span> Args<span class="special">&gt;</span> <span class="identifier">iterator</span> <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_41_2-bb"><span class="identifier">emplace_hint</span></a><span class="special">(</span><span class="identifier">const_iterator</span><span class="special">,</span> <span class="identifier">Args</span><span class="special">&amp;&amp;</span><span class="special">...</span><span class="special">)</span><span class="special">;</span>
  <span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">iterator</span><span class="special">,</span> <span class="keyword">bool</span><span class="special">&gt;</span> <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_41_3-bb"><span class="identifier">insert</span></a><span class="special">(</span><span class="identifier">value_type</span> <span class="keyword">const</span><span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">iterator</span><span class="special">,</span> <span class="keyword">bool</span><span class="special">&gt;</span> <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_41_4-bb"><span class="identifier">insert</span></a><span class="special">(</span><span class="identifier">value_type</span><span class="special">&amp;&amp;</span><span class="special">)</span><span class="special">;</span>
  <span class="identifier">iterator</span> <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_41_5-bb"><span class="identifier">insert</span></a><span class="special">(</span><span class="identifier">const_iterator</span><span class="special">,</span> <span class="identifier">value_type</span> <span class="keyword">const</span><span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <span class="identifier">iterator</span> <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_41_6-bb"><span class="identifier">insert</span></a><span class="special">(</span><span class="identifier">const_iterator</span><span class="special">,</span> <span class="identifier">value_type</span><span class="special">&amp;&amp;</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <a class="link" href="../InputIterator.html" title="Concept InputIterator">InputIterator</a><span class="special">&gt;</span> <span class="keyword">void</span> <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_41_7-bb"><span class="identifier">insert</span></a><span class="special">(</span><span class="identifier">InputIterator</span><span class="special">,</span> <span class="identifier">InputIterator</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">void</span> <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_41_8-bb"><span class="identifier">insert</span></a><span class="special">(</span><span class="identifier">initializer_list</span><span class="special">&lt;</span><span class="identifier">value_type</span><span class="special">&gt;</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">void</span> <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_41_9-bb"><span class="identifier">insert</span></a><span class="special">(</span><span class="identifier">initializer_list</span><span class="special">&lt;</span><span class="identifier">value_type</span><span class="special">&gt;</span><span class="special">)</span><span class="special">;</span>
  <span class="identifier">node_type</span> <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_41_10-bb"><span class="identifier">extract</span></a><span class="special">(</span><span class="identifier">const_iterator</span><span class="special">)</span><span class="special">;</span>
  <span class="identifier">node_type</span> <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_41_11-bb"><span class="identifier">extract</span></a><span class="special">(</span><span class="identifier">key_type</span> <span class="keyword">const</span><span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <span class="identifier">insert_return_type</span> <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_41_12-bb"><span class="identifier">insert</span></a><span class="special">(</span><span class="identifier">node_type</span><span class="special">&amp;&amp;</span><span class="special">)</span><span class="special">;</span>
  <span class="identifier">iterator</span> <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_41_13-bb"><span class="identifier">insert</span></a><span class="special">(</span><span class="identifier">const_iterator</span><span class="special">,</span> <span class="identifier">node_type</span><span class="special">&amp;&amp;</span><span class="special">)</span><span class="special">;</span>
  <span class="identifier">iterator</span> <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_41_14-bb"><span class="identifier">erase</span></a><span class="special">(</span><span class="identifier">const_iterator</span><span class="special">)</span><span class="special">;</span>
  <span class="identifier">size_type</span> <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_41_15-bb"><span class="identifier">erase</span></a><span class="special">(</span><span class="identifier">key_type</span> <span class="keyword">const</span><span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <span class="identifier">iterator</span> <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_41_16-bb"><span class="identifier">erase</span></a><span class="special">(</span><span class="identifier">const_iterator</span><span class="special">,</span> <span class="identifier">const_iterator</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">void</span> <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_41_17-bb"><span class="identifier">quick_erase</span></a><span class="special">(</span><span class="identifier">const_iterator</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">void</span> <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_41_18-bb"><span class="identifier">erase_return_void</span></a><span class="special">(</span><span class="identifier">const_iterator</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">void</span> <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_41_19-bb"><span class="identifier">clear</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">void</span> <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_41_20-bb"><span class="identifier">swap</span></a><span class="special">(</span><span class="identifier">unordered_set</span><span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> H2<span class="special">,</span> <span class="keyword">typename</span> P2<span class="special">&gt;</span> 
     <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_41_21-bb"><span class="identifier">merge</span></a><span class="special">(</span><span class="identifier">unordered_set</span><span class="special">&lt;</span><span class="identifier">Value</span><span class="special">,</span> <span class="identifier">H2</span><span class="special">,</span> <span class="identifier">P2</span><span class="special">,</span> <span class="identifier">Alloc</span><span class="special">&gt;</span><span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> H2<span class="special">,</span> <span class="keyword">typename</span> P2<span class="special">&gt;</span> 
     <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_41_22-bb"><span class="identifier">merge</span></a><span class="special">(</span><span class="identifier">unordered_set</span><span class="special">&lt;</span><span class="identifier">Value</span><span class="special">,</span> <span class="identifier">H2</span><span class="special">,</span> <span class="identifier">P2</span><span class="special">,</span> <span class="identifier">Alloc</span><span class="special">&gt;</span><span class="special">&amp;&amp;</span><span class="special">)</span><span class="special">;</span>

  <span class="comment">// <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_42-bb">observers</a></span>
  <span class="identifier">hasher</span> <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_42_1-bb"><span class="identifier">hash_function</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="identifier">key_equal</span> <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_42_2-bb"><span class="identifier">key_eq</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>

  <span class="comment">// <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_43-bb">lookup</a></span>
  <span class="identifier">iterator</span> <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_43_1_1-bb"><span class="identifier">find</span></a><span class="special">(</span><span class="identifier">key_type</span> <span class="keyword">const</span><span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <span class="identifier">const_iterator</span> <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_43_1_2-bb"><span class="identifier">find</span></a><span class="special">(</span><span class="identifier">key_type</span> <span class="keyword">const</span><span class="special">&amp;</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> CompatibleKey<span class="special">,</span> <span class="keyword">typename</span> CompatibleHash<span class="special">,</span> 
           <span class="keyword">typename</span> CompatiblePredicate<span class="special">&gt;</span> 
    <span class="identifier">iterator</span> <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_43_1_3-bb"><span class="identifier">find</span></a><span class="special">(</span><span class="identifier">CompatibleKey</span> <span class="keyword">const</span><span class="special">&amp;</span><span class="special">,</span> <span class="identifier">CompatibleHash</span> <span class="keyword">const</span><span class="special">&amp;</span><span class="special">,</span> 
                  <span class="identifier">CompatiblePredicate</span> <span class="keyword">const</span><span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> CompatibleKey<span class="special">,</span> <span class="keyword">typename</span> CompatibleHash<span class="special">,</span> 
           <span class="keyword">typename</span> CompatiblePredicate<span class="special">&gt;</span> 
    <span class="identifier">const_iterator</span> 
    <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_43_1_4-bb"><span class="identifier">find</span></a><span class="special">(</span><span class="identifier">CompatibleKey</span> <span class="keyword">const</span><span class="special">&amp;</span><span class="special">,</span> <span class="identifier">CompatibleHash</span> <span class="keyword">const</span><span class="special">&amp;</span><span class="special">,</span> 
         <span class="identifier">CompatiblePredicate</span> <span class="keyword">const</span><span class="special">&amp;</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="identifier">size_type</span> <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_43_2-bb"><span class="identifier">count</span></a><span class="special">(</span><span class="identifier">key_type</span> <span class="keyword">const</span><span class="special">&amp;</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">iterator</span><span class="special">,</span> <span class="identifier">iterator</span><span class="special">&gt;</span> <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_43_3_1-bb"><span class="identifier">equal_range</span></a><span class="special">(</span><span class="identifier">key_type</span> <span class="keyword">const</span><span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">const_iterator</span><span class="special">,</span> <span class="identifier">const_iterator</span><span class="special">&gt;</span> <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_43_3_2-bb"><span class="identifier">equal_range</span></a><span class="special">(</span><span class="identifier">key_type</span> <span class="keyword">const</span><span class="special">&amp;</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>

  <span class="comment">// <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_44-bb">bucket interface</a></span>
  <span class="identifier">size_type</span> <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_44_1-bb"><span class="identifier">bucket_count</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="identifier">size_type</span> <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_44_2-bb"><span class="identifier">max_bucket_count</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="identifier">size_type</span> <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_44_3-bb"><span class="identifier">bucket_size</span></a><span class="special">(</span><span class="identifier">size_type</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="identifier">size_type</span> <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_44_4-bb"><span class="identifier">bucket</span></a><span class="special">(</span><span class="identifier">key_type</span> <span class="keyword">const</span><span class="special">&amp;</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="identifier">local_iterator</span> <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_44_5_1-bb"><span class="identifier">begin</span></a><span class="special">(</span><span class="identifier">size_type</span><span class="special">)</span><span class="special">;</span>
  <span class="identifier">const_local_iterator</span> <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_44_5_2-bb"><span class="identifier">begin</span></a><span class="special">(</span><span class="identifier">size_type</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="identifier">local_iterator</span> <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_44_6_1-bb"><span class="identifier">end</span></a><span class="special">(</span><span class="identifier">size_type</span><span class="special">)</span><span class="special">;</span>
  <span class="identifier">const_local_iterator</span> <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_44_6_2-bb"><span class="identifier">end</span></a><span class="special">(</span><span class="identifier">size_type</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="identifier">const_local_iterator</span> <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_44_7-bb"><span class="identifier">cbegin</span></a><span class="special">(</span><span class="identifier">size_type</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="identifier">const_local_iterator</span> <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_44_8-bb"><span class="identifier">cend</span></a><span class="special">(</span><span class="identifier">size_type</span><span class="special">)</span><span class="special">;</span>

  <span class="comment">// <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_45-bb">hash policy</a></span>
  <span class="keyword">float</span> <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_45_1-bb"><span class="identifier">load_factor</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="keyword">float</span> <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_45_2-bb"><span class="identifier">max_load_factor</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="keyword">void</span> <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_45_3-bb"><span class="identifier">max_load_factor</span></a><span class="special">(</span><span class="keyword">float</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">void</span> <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_45_4-bb"><span class="identifier">rehash</span></a><span class="special">(</span><span class="identifier">size_type</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">void</span> <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_45_5-bb"><span class="identifier">reserve</span></a><span class="special">(</span><span class="identifier">size_type</span><span class="special">)</span><span class="special">;</span>
<span class="special">}</span><span class="special">;</span>

<span class="comment">// <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_46-bb">Equality Comparisons</a></span>
<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Value<span class="special">,</span> <span class="keyword">typename</span> Hash<span class="special">,</span> <span class="keyword">typename</span> Pred<span class="special">,</span> <span class="keyword">typename</span> Alloc<span class="special">&gt;</span> 
  <span class="keyword">bool</span> <a class="link" href="unordered_set.html#boost.unordered_set.operator=="><span class="keyword">operator</span><span class="special">==</span></a><span class="special">(</span><span class="identifier">unordered_set</span><span class="special">&lt;</span><span class="identifier">Value</span><span class="special">,</span> <span class="identifier">Hash</span><span class="special">,</span> <span class="identifier">Pred</span><span class="special">,</span> <span class="identifier">Alloc</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;</span><span class="special">,</span> 
                  <span class="identifier">unordered_set</span><span class="special">&lt;</span><span class="identifier">Value</span><span class="special">,</span> <span class="identifier">Hash</span><span class="special">,</span> <span class="identifier">Pred</span><span class="special">,</span> <span class="identifier">Alloc</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Value<span class="special">,</span> <span class="keyword">typename</span> Hash<span class="special">,</span> <span class="keyword">typename</span> Pred<span class="special">,</span> <span class="keyword">typename</span> Alloc<span class="special">&gt;</span> 
  <span class="keyword">bool</span> <a class="link" href="unordered_set.html#boost.unordered_set.operator!="><span class="keyword">operator</span><span class="special">!=</span></a><span class="special">(</span><span class="identifier">unordered_set</span><span class="special">&lt;</span><span class="identifier">Value</span><span class="special">,</span> <span class="identifier">Hash</span><span class="special">,</span> <span class="identifier">Pred</span><span class="special">,</span> <span class="identifier">Alloc</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;</span><span class="special">,</span> 
                  <span class="identifier">unordered_set</span><span class="special">&lt;</span><span class="identifier">Value</span><span class="special">,</span> <span class="identifier">Hash</span><span class="special">,</span> <span class="identifier">Pred</span><span class="special">,</span> <span class="identifier">Alloc</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>

<span class="comment">// <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_47-bb">swap</a></span>
<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Value<span class="special">,</span> <span class="keyword">typename</span> Hash<span class="special">,</span> <span class="keyword">typename</span> Pred<span class="special">,</span> <span class="keyword">typename</span> Alloc<span class="special">&gt;</span> 
  <span class="keyword">void</span> <a class="link" href="unordered_set.html#boost.unordered_set.swap"><span class="identifier">swap</span></a><span class="special">(</span><span class="identifier">unordered_set</span><span class="special">&lt;</span><span class="identifier">Value</span><span class="special">,</span> <span class="identifier">Hash</span><span class="special">,</span> <span class="identifier">Pred</span><span class="special">,</span> <span class="identifier">Alloc</span><span class="special">&gt;</span><span class="special">&amp;</span><span class="special">,</span> 
            <span class="identifier">unordered_set</span><span class="special">&lt;</span><span class="identifier">Value</span><span class="special">,</span> <span class="identifier">Hash</span><span class="special">,</span> <span class="identifier">Pred</span><span class="special">,</span> <span class="identifier">Alloc</span><span class="special">&gt;</span><span class="special">&amp;</span><span class="special">)</span><span class="special">;</span></pre></div>
<div class="refsect1">
<a name="id-1.3.46.10.2.4.4"></a><h2>Description</h2>
<p><span class="bold"><strong>Template Parameters</strong></span>
              </p>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
</colgroup>
<tbody>
<tr>
<td><span class="emphasis"><em>Value</em></span></td>
<td>
<code class="computeroutput">Value</code> must be <code class="computeroutput">Erasable</code> from the container
                        (i.e. <code class="computeroutput">allocator_traits</code> can <code class="computeroutput">destroy</code> it).
                      </td>
</tr>
<tr>
<td><span class="emphasis"><em>Hash</em></span></td>
<td>A unary function object type that acts a hash function for a <code class="computeroutput">Value</code>. It takes a single argument of type <code class="computeroutput">Value</code> and returns a value of type std::size_t.</td>
</tr>
<tr>
<td><span class="emphasis"><em>Pred</em></span></td>
<td>A binary function object that implements an equivalence relation on values of type <code class="computeroutput">Value</code>.
                        A binary function object that induces an equivalence relation on values of type <code class="computeroutput">Value</code>.
                        It takes two arguments of type <code class="computeroutput">Value</code> and returns a value of type bool.</td>
</tr>
<tr>
<td><span class="emphasis"><em>Alloc</em></span></td>
<td>An allocator whose value type is the same as the container's value type.</td>
</tr>
</tbody>
</table></div>
<p>The elements are organized into buckets. Keys with the same hash code are stored in the same bucket.</p>
<p>The number of buckets can be automatically increased by a call to insert, or as the result of calling rehash.</p>
<div class="refsect2">
<a name="id-1.3.46.10.2.4.4.5"></a><h3>
<a name="boost.unordered_settypes"></a><code class="computeroutput">unordered_set</code> 
        public
       types</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<p>
<span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">allocator_type</span><span class="special">::</span><span class="identifier">pointer</span> <a name="boost.unordered_set.pointer"></a><span class="identifier">pointer</span><span class="special">;</span></p>
<p>
                <code class="computeroutput">value_type*</code> if
                <code class="computeroutput">allocator_type::pointer</code> is not defined.
              </p>
</li>
<li class="listitem">
<p>
<span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">allocator_type</span><span class="special">::</span><span class="identifier">const_pointer</span> <a name="boost.unordered_set.const_pointer"></a><span class="identifier">const_pointer</span><span class="special">;</span></p>
<p>
                <code class="computeroutput">boost::pointer_to_other&lt;pointer, value_type&gt;::type</code>
                if <code class="computeroutput">allocator_type::const_pointer</code> is not defined.
              </p>
</li>
<li class="listitem">
<p>
<span class="keyword">typedef</span> <span class="emphasis"><em><span class="identifier">implementation</span><span class="special">-</span><span class="identifier">defined</span></em></span> <a name="boost.unordered_set.size_type"></a><span class="identifier">size_type</span><span class="special">;</span></p>
<p>An unsigned integral type.</p>
<p>size_type can represent any non-negative value of difference_type.</p>
</li>
<li class="listitem">
<p>
<span class="keyword">typedef</span> <span class="emphasis"><em><span class="identifier">implementation</span><span class="special">-</span><span class="identifier">defined</span></em></span> <a name="boost.unordered_set.difference_type"></a><span class="identifier">difference_type</span><span class="special">;</span></p>
<p>A signed integral type.</p>
<p>Is identical to the difference type of iterator and const_iterator.</p>
</li>
<li class="listitem">
<p>
<span class="keyword">typedef</span> <span class="emphasis"><em><span class="identifier">implementation</span><span class="special">-</span><span class="identifier">defined</span></em></span> <a name="boost.unordered_set.iterator"></a><span class="identifier">iterator</span><span class="special">;</span></p>
<p>A constant iterator whose value type is value_type. </p>
<p>The iterator category is at least a forward iterator.</p>
<p>Convertible to const_iterator.</p>
</li>
<li class="listitem">
<p>
<span class="keyword">typedef</span> <span class="emphasis"><em><span class="identifier">implementation</span><span class="special">-</span><span class="identifier">defined</span></em></span> <a name="boost.unordered_set.const_iterator"></a><span class="identifier">const_iterator</span><span class="special">;</span></p>
<p>A constant iterator whose value type is value_type. </p>
<p>The iterator category is at least a forward iterator.</p>
</li>
<li class="listitem">
<p>
<span class="keyword">typedef</span> <span class="emphasis"><em><span class="identifier">implementation</span><span class="special">-</span><span class="identifier">defined</span></em></span> <a name="boost.unordered_set.local_iterator"></a><span class="identifier">local_iterator</span><span class="special">;</span></p>
<p>An iterator with the same value type, difference type and pointer and reference type as iterator.</p>
<p>A local_iterator object can be used to iterate through a single bucket.</p>
</li>
<li class="listitem">
<p>
<span class="keyword">typedef</span> <span class="emphasis"><em><span class="identifier">implementation</span><span class="special">-</span><span class="identifier">defined</span></em></span> <a name="boost.unordered_set.const_local_iterator"></a><span class="identifier">const_local_iterator</span><span class="special">;</span></p>
<p>A constant iterator with the same value type, difference type and pointer and reference type as const_iterator.</p>
<p>A const_local_iterator object can be used to iterate through a single bucket.</p>
</li>
<li class="listitem">
<p>
<span class="keyword">typedef</span> <span class="emphasis"><em><span class="identifier">implementation</span><span class="special">-</span><span class="identifier">defined</span></em></span> <a name="boost.unordered_set.node_type"></a><span class="identifier">node_type</span><span class="special">;</span></p>
<p>See node_handle_set for details.</p>
</li>
<li class="listitem">
<p>
<span class="keyword">typedef</span> <span class="emphasis"><em><span class="identifier">implementation</span><span class="special">-</span><span class="identifier">defined</span></em></span> <a name="boost.unordered_set.insert_return_type"></a><span class="identifier">insert_return_type</span><span class="special">;</span></p>
              Structure returned by inserting <code class="computeroutput">node_type</code>.
            </li>
</ol></div>
</div>
<div class="refsect2">
<a name="id-1.3.46.10.2.4.4.6"></a><h3>
<a name="boost.unordered_setconstruct-copy-destruct"></a><code class="computeroutput">unordered_set</code> 
        public
       construct/copy/destruct</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><a name="id-1_3_46_10_1_1_1_21-bb"></a><span class="identifier">unordered_set</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>
<p>Constructs an empty container using hasher() as the hash function, key_equal() as the key equality predicate, allocator_type() as the allocator and a maximum load factor of 1.0.</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Postconditions:</span></p></td>
<td><code class="computeroutput"><a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_39_2-bb">size</a>() == 0</code></td>
</tr>
<tr>
<td><p><span class="term">Requires:</span></p></td>
<td><p>If the defaults are used, <code class="computeroutput">hasher</code>, <code class="computeroutput">key_equal</code> and
                <code class="computeroutput">allocator_type</code> need to be <code class="computeroutput">DefaultConstructible</code>.
              </p></td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">explicit</span> <a name="id-1_3_46_10_1_1_1_22-bb"></a><span class="identifier">unordered_set</span><span class="special">(</span><span class="identifier">size_type</span> n<span class="special">,</span> <span class="identifier">hasher</span> <span class="keyword">const</span><span class="special">&amp;</span> hf <span class="special">=</span> <span class="identifier">hasher</span><span class="special">(</span><span class="special">)</span><span class="special">,</span> 
                       <span class="identifier">key_equal</span> <span class="keyword">const</span><span class="special">&amp;</span> eq <span class="special">=</span> <span class="identifier">key_equal</span><span class="special">(</span><span class="special">)</span><span class="special">,</span> 
                       <span class="identifier">allocator_type</span> <span class="keyword">const</span><span class="special">&amp;</span> a <span class="special">=</span> <span class="identifier">allocator_type</span><span class="special">(</span><span class="special">)</span><span class="special">)</span><span class="special">;</span></pre>
<p>Constructs an empty container with at least n buckets, using hf as the hash function, eq as the key equality predicate, a as the allocator and a maximum load factor of 1.0.</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Postconditions:</span></p></td>
<td><code class="computeroutput"><a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_39_2-bb">size</a>() == 0</code></td>
</tr>
<tr>
<td><p><span class="term">Requires:</span></p></td>
<td><p>If the defaults are used, <code class="computeroutput">hasher</code>, <code class="computeroutput">key_equal</code> and
                <code class="computeroutput">allocator_type</code> need to be <code class="computeroutput">DefaultConstructible</code>.
              </p></td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <a class="link" href="../InputIterator.html" title="Concept InputIterator">InputIterator</a><span class="special">&gt;</span> 
  <a name="id-1_3_46_10_1_1_1_23-bb"></a><span class="identifier">unordered_set</span><span class="special">(</span><span class="identifier">InputIterator</span> f<span class="special">,</span> <span class="identifier">InputIterator</span> l<span class="special">,</span> 
                <span class="identifier">size_type</span> n <span class="special">=</span> <span class="emphasis"><em><span class="identifier">implementation</span><span class="special">-</span><span class="identifier">defined</span></em></span><span class="special">,</span> 
                <span class="identifier">hasher</span> <span class="keyword">const</span><span class="special">&amp;</span> hf <span class="special">=</span> <span class="identifier">hasher</span><span class="special">(</span><span class="special">)</span><span class="special">,</span> 
                <span class="identifier">key_equal</span> <span class="keyword">const</span><span class="special">&amp;</span> eq <span class="special">=</span> <span class="identifier">key_equal</span><span class="special">(</span><span class="special">)</span><span class="special">,</span> 
                <span class="identifier">allocator_type</span> <span class="keyword">const</span><span class="special">&amp;</span> a <span class="special">=</span> <span class="identifier">allocator_type</span><span class="special">(</span><span class="special">)</span><span class="special">)</span><span class="special">;</span></pre>
<p>Constructs an empty container with at least <code class="computeroutput">n</code> buckets,
              using <code class="computeroutput">hf</code> as the hash function,
              <code class="computeroutput">eq</code> as the key equality predicate,
              <code class="computeroutput">a</code> as the allocator and a maximum load factor of 1.0
              and inserts the elements from [f, l) into it.
              </p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term">Requires:</span></p></td>
<td><p>If the defaults are used, <code class="computeroutput">hasher</code>, <code class="computeroutput">key_equal</code> and
                <code class="computeroutput">allocator_type</code> need to be <code class="computeroutput">DefaultConstructible</code>.
              </p></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><a name="id-1_3_46_10_1_1_1_24-bb"></a><span class="identifier">unordered_set</span><span class="special">(</span><span class="identifier">unordered_set</span> <span class="keyword">const</span><span class="special">&amp;</span><span class="special">)</span><span class="special">;</span></pre>
<p>The copy constructor. Copies the contained elements, hash function, predicate, maximum load factor and allocator.</p>
<p>If <code class="computeroutput">Allocator::select_on_container_copy_construction</code>
              exists and has the right signature, the allocator will be
              constructed from its result.</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term">Requires:</span></p></td>
<td><p><code class="computeroutput">value_type</code> is copy constructible</p></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><a name="id-1_3_46_10_1_1_1_25-bb"></a><span class="identifier">unordered_set</span><span class="special">(</span><span class="identifier">unordered_set</span> <span class="special">&amp;&amp;</span><span class="special">)</span><span class="special">;</span></pre>
<p>The move constructor.</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Notes:</span></p></td>
<td><p>This is implemented using Boost.Move.</p></td>
</tr>
<tr>
<td><p><span class="term">Requires:</span></p></td>
<td>
<p>
                <code class="computeroutput">value_type</code> is move constructible.
              </p>
<p>
                On compilers without rvalue reference support the
                emulation does not support moving without calling
                <code class="computeroutput">boost::move</code> if <code class="computeroutput">value_type</code> is
                not copyable. So, for example, you can't return the
                container from a function.
              </p>
</td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">explicit</span> <a name="id-1_3_46_10_1_1_1_26-bb"></a><span class="identifier">unordered_set</span><span class="special">(</span><span class="identifier">Allocator</span> <span class="keyword">const</span><span class="special">&amp;</span> a<span class="special">)</span><span class="special">;</span></pre>
<p>Constructs an empty container, using allocator <code class="computeroutput">a</code>.</p>
</li>
<li class="listitem">
<pre class="literallayout"><a name="id-1_3_46_10_1_1_1_27-bb"></a><span class="identifier">unordered_set</span><span class="special">(</span><span class="identifier">unordered_set</span> <span class="keyword">const</span><span class="special">&amp;</span> x<span class="special">,</span> <span class="identifier">Allocator</span> <span class="keyword">const</span><span class="special">&amp;</span> a<span class="special">)</span><span class="special">;</span></pre>
<p>Constructs an container, copying <code class="computeroutput">x</code>'s contained elements, hash function, predicate, maximum load factor, but using allocator <code class="computeroutput">a</code>.</p>
</li>
<li class="listitem">
<pre class="literallayout"><a name="id-1_3_46_10_1_1_1_28-bb"></a><span class="identifier">unordered_set</span><span class="special">(</span><span class="identifier">unordered_set</span> <span class="special">&amp;&amp;</span> x<span class="special">,</span> <span class="identifier">Allocator</span> <span class="keyword">const</span><span class="special">&amp;</span> a<span class="special">)</span><span class="special">;</span></pre>
<p>Construct a container moving <code class="computeroutput">x</code>'s contained elements, and having the hash function, predicate and maximum load factor, but using allocate <code class="computeroutput">a</code>.</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Notes:</span></p></td>
<td><p>This is implemented using Boost.Move.</p></td>
</tr>
<tr>
<td><p><span class="term">Requires:</span></p></td>
<td><p>
                <code class="computeroutput">value_type</code> is move insertable.
              </p></td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><a name="id-1_3_46_10_1_1_1_29-bb"></a><span class="identifier">unordered_set</span><span class="special">(</span><span class="identifier">initializer_list</span><span class="special">&lt;</span><span class="identifier">value_type</span><span class="special">&gt;</span> il<span class="special">,</span> 
              <span class="identifier">size_type</span> n <span class="special">=</span> <span class="emphasis"><em><span class="identifier">implementation</span><span class="special">-</span><span class="identifier">defined</span></em></span><span class="special">,</span> 
              <span class="identifier">hasher</span> <span class="keyword">const</span><span class="special">&amp;</span> hf <span class="special">=</span> <span class="identifier">hasher</span><span class="special">(</span><span class="special">)</span><span class="special">,</span> <span class="identifier">key_equal</span> <span class="keyword">const</span><span class="special">&amp;</span> eq <span class="special">=</span> <span class="identifier">key_equal</span><span class="special">(</span><span class="special">)</span><span class="special">,</span> 
              <span class="identifier">allocator_type</span> <span class="keyword">const</span><span class="special">&amp;</span> a <span class="special">=</span> <span class="identifier">allocator_type</span><span class="special">(</span><span class="special">)</span><span class="special">)</span><span class="special">;</span></pre>
<p>Constructs an empty container with at least <code class="computeroutput">n</code> buckets,
                using <code class="computeroutput">hf</code> as the hash function,
                <code class="computeroutput">eq</code> as the key equality predicate,
                <code class="computeroutput">a</code> as the allocator and a maximum load factor of 1.0
                and inserts the elements from <code class="computeroutput">il</code> into it.
              </p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term">Requires:</span></p></td>
<td><p>If the defaults are used, <code class="computeroutput">hasher</code>, <code class="computeroutput">key_equal</code> and
                <code class="computeroutput">allocator_type</code> need to be <code class="computeroutput">DefaultConstructible</code>.
              </p></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><a name="id-1_3_46_10_1_1_1_30-bb"></a><span class="identifier">unordered_set</span><span class="special">(</span><span class="identifier">size_type</span> n<span class="special">,</span> <span class="identifier">allocator_type</span> <span class="keyword">const</span><span class="special">&amp;</span> a<span class="special">)</span><span class="special">;</span></pre>
<p>Constructs an empty container with at least <code class="computeroutput">n</code> buckets,
              using <code class="computeroutput">hf</code> as the hash function,
              the default hash function and key equality predicate,
              <code class="computeroutput">a</code> as the allocator and a maximum load factor of 1.0.</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Postconditions:</span></p></td>
<td><code class="computeroutput"><a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_39_2-bb">size</a>() == 0</code></td>
</tr>
<tr>
<td><p><span class="term">Requires:</span></p></td>
<td><p><code class="computeroutput">hasher</code> and <code class="computeroutput">key_equal</code> need to be <code class="computeroutput">DefaultConstructible</code>.
              </p></td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><a name="id-1_3_46_10_1_1_1_31-bb"></a><span class="identifier">unordered_set</span><span class="special">(</span><span class="identifier">size_type</span> n<span class="special">,</span> <span class="identifier">hasher</span> <span class="keyword">const</span><span class="special">&amp;</span> hf<span class="special">,</span> <span class="identifier">allocator_type</span> <span class="keyword">const</span><span class="special">&amp;</span> a<span class="special">)</span><span class="special">;</span></pre>
<p>Constructs an empty container with at least <code class="computeroutput">n</code> buckets,
              using <code class="computeroutput">hf</code> as the hash function,
              the default key equality predicate,
              <code class="computeroutput">a</code> as the allocator and a maximum load factor of 1.0.</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Postconditions:</span></p></td>
<td><code class="computeroutput"><a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_39_2-bb">size</a>() == 0</code></td>
</tr>
<tr>
<td><p><span class="term">Requires:</span></p></td>
<td><p><code class="computeroutput">key_equal</code> needs to be <code class="computeroutput">DefaultConstructible</code>.
              </p></td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <a class="link" href="../InputIterator.html" title="Concept InputIterator">InputIterator</a><span class="special">&gt;</span> 
  <a name="id-1_3_46_10_1_1_1_32-bb"></a><span class="identifier">unordered_set</span><span class="special">(</span><span class="identifier">InputIterator</span> f<span class="special">,</span> <span class="identifier">InputIterator</span> l<span class="special">,</span> <span class="identifier">size_type</span> n<span class="special">,</span> 
                <span class="identifier">allocator_type</span> <span class="keyword">const</span><span class="special">&amp;</span> a<span class="special">)</span><span class="special">;</span></pre>
<p>Constructs an empty container with at least <code class="computeroutput">n</code> buckets,
              using  <code class="computeroutput">a</code> as the allocator, with the
              default hash function and key equality predicate
              and a maximum load factor of 1.0
              and inserts the elements from [f, l) into it.
              </p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term">Requires:</span></p></td>
<td><p><code class="computeroutput">hasher</code>, <code class="computeroutput">key_equal</code> need to be <code class="computeroutput">DefaultConstructible</code>.
              </p></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <a class="link" href="../InputIterator.html" title="Concept InputIterator">InputIterator</a><span class="special">&gt;</span> 
  <a name="id-1_3_46_10_1_1_1_33-bb"></a><span class="identifier">unordered_set</span><span class="special">(</span><span class="identifier">InputIterator</span> f<span class="special">,</span> <span class="identifier">InputIterator</span> l<span class="special">,</span> <span class="identifier">size_type</span> n<span class="special">,</span> 
                <span class="identifier">hasher</span> <span class="keyword">const</span><span class="special">&amp;</span> hf<span class="special">,</span> <span class="identifier">allocator_type</span> <span class="keyword">const</span><span class="special">&amp;</span> a<span class="special">)</span><span class="special">;</span></pre>
<p>Constructs an empty container with at least <code class="computeroutput">n</code> buckets,
              using <code class="computeroutput">hf</code> as the hash function,
              <code class="computeroutput">a</code> as the allocator, with the
              default key equality predicate
              and a maximum load factor of 1.0
              and inserts the elements from [f, l) into it.
              </p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term">Requires:</span></p></td>
<td><p><code class="computeroutput">key_equal</code> needs to be <code class="computeroutput">DefaultConstructible</code>.
              </p></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><a name="id-1_3_46_10_1_1_1_34-bb"></a><span class="special">~</span><span class="identifier">unordered_set</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term">Notes:</span></p></td>
<td><p>The destructor is applied to every element, and all memory is deallocated</p></td>
</tr></tbody>
</table></div>
</li>
</ol></div>
</div>
<pre class="literallayout"><span class="identifier">unordered_set</span><span class="special">&amp;</span> <a name="id-1_3_46_10_1_1_1_35-bb"></a><span class="keyword">operator</span><span class="special">=</span><span class="special">(</span><span class="identifier">unordered_set</span> <span class="keyword">const</span><span class="special">&amp;</span><span class="special">)</span><span class="special">;</span></pre>
<p>The assignment operator. Copies the contained elements, hash function, predicate and maximum load factor but not the allocator.</p>
<p>If <code class="computeroutput">Alloc::propagate_on_container_copy_assignment</code>
              exists and <code class="computeroutput">Alloc::propagate_on_container_copy_assignment::value
              </code> is true, the allocator is overwritten, if not the
              copied elements are created using the existing
              allocator.</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term">Requires:</span></p></td>
<td><p><code class="computeroutput">value_type</code> is copy constructible</p></td>
</tr></tbody>
</table></div>
<pre class="literallayout"><span class="identifier">unordered_set</span><span class="special">&amp;</span> <a name="id-1_3_46_10_1_1_1_36-bb"></a><span class="keyword">operator</span><span class="special">=</span><span class="special">(</span><span class="identifier">unordered_set</span> <span class="special">&amp;&amp;</span><span class="special">)</span><span class="special">;</span></pre>
<p>The move assignment operator.</p>
<p>If <code class="computeroutput">Alloc::propagate_on_container_move_assignment</code>
              exists and <code class="computeroutput">Alloc::propagate_on_container_move_assignment::value
              </code> is true, the allocator is overwritten, if not the
              moved elements are created using the existing
              allocator.</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Notes:</span></p></td>
<td><p>
                On compilers without rvalue references, this is emulated using
                Boost.Move. Note that on some compilers the copy assignment
                operator may be used in some circumstances.
              </p></td>
</tr>
<tr>
<td><p><span class="term">Requires:</span></p></td>
<td><p>
                <code class="computeroutput">value_type</code> is move constructible.
              </p></td>
</tr>
</tbody>
</table></div>
<pre class="literallayout"><span class="identifier">unordered_set</span><span class="special">&amp;</span> <a name="id-1_3_46_10_1_1_1_37-bb"></a><span class="keyword">operator</span><span class="special">=</span><span class="special">(</span><span class="identifier">initializer_list</span><span class="special">&lt;</span><span class="identifier">value_type</span><span class="special">&gt;</span><span class="special">)</span><span class="special">;</span></pre>
<p>Assign from values in initializer list. All existing elements are either overwritten by the new elements or destroyed.</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term">Requires:</span></p></td>
<td><p>
                <code class="computeroutput">value_type</code> is <code class="computeroutput">CopyInsertable</code> into the container and
                <code class="computeroutput">CopyAssignable</code>.
              </p></td>
</tr></tbody>
</table></div>
<pre class="literallayout"><span class="identifier">allocator_type</span> <a name="id-1_3_46_10_1_1_1_38-bb"></a><span class="identifier">get_allocator</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
<div class="refsect2">
<a name="id-1.3.46.10.2.4.4.19"></a><h3>
<a name="id-1_3_46_10_1_1_1_39-bb"></a><code class="computeroutput">unordered_set</code> size and capacity</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><span class="keyword">bool</span> <a name="id-1_3_46_10_1_1_1_39_1-bb"></a><span class="identifier">empty</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term">Returns:</span></p></td>
<td><code class="computeroutput"><a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_39_2-bb">size</a>() == 0</code></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">size_type</span> <a name="id-1_3_46_10_1_1_1_39_2-bb"></a><span class="identifier">size</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term">Returns:</span></p></td>
<td><code class="computeroutput">std::distance(<a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_40_1-bb">begin</a>(), <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_40_2-bb">end</a>())</code></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">size_type</span> <a name="id-1_3_46_10_1_1_1_39_3-bb"></a><span class="identifier">max_size</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term">Returns:</span></p></td>
<td>
<code class="computeroutput"><a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_39_2-bb">size</a>()</code> of the largest possible container.
              </td>
</tr></tbody>
</table></div>
</li>
</ol></div>
</div>
<div class="refsect2">
<a name="id-1.3.46.10.2.4.4.20"></a><h3>
<a name="id-1_3_46_10_1_1_1_40-bb"></a><code class="computeroutput">unordered_set</code> iterators</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><a name="id-1_3_46_10_1_1_1_40_1-bb"></a><span class="identifier">iterator</span> <a name="id-1_3_46_10_1_1_1_40_1_1-bb"></a><span class="identifier">begin</span><span class="special">(</span><span class="special">)</span><span class="special">;</span>
<span class="identifier">const_iterator</span> <a name="id-1_3_46_10_1_1_1_40_1_2-bb"></a><span class="identifier">begin</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term">Returns:</span></p></td>
<td>An iterator referring to the first element of the container, or if the container is empty the past-the-end value for the container.
              </td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><a name="id-1_3_46_10_1_1_1_40_2-bb"></a><span class="identifier">iterator</span> <a name="id-1_3_46_10_1_1_1_40_2_1-bb"></a><span class="identifier">end</span><span class="special">(</span><span class="special">)</span><span class="special">;</span>
<span class="identifier">const_iterator</span> <a name="id-1_3_46_10_1_1_1_40_2_2-bb"></a><span class="identifier">end</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term">Returns:</span></p></td>
<td>An iterator which refers to the past-the-end value for the container.
              </td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">const_iterator</span> <a name="id-1_3_46_10_1_1_1_40_3-bb"></a><span class="identifier">cbegin</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term">Returns:</span></p></td>
<td>A constant iterator referring to the first element of the container, or if the container is empty the past-the-end value for the container.
              </td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">const_iterator</span> <a name="id-1_3_46_10_1_1_1_40_4-bb"></a><span class="identifier">cend</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term">Returns:</span></p></td>
<td>A constant iterator which refers to the past-the-end value for the container.
              </td>
</tr></tbody>
</table></div>
</li>
</ol></div>
</div>
<div class="refsect2">
<a name="id-1.3.46.10.2.4.4.21"></a><h3>
<a name="id-1_3_46_10_1_1_1_41-bb"></a><code class="computeroutput">unordered_set</code> modifiers</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span><span class="special">...</span> Args<span class="special">&gt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">iterator</span><span class="special">,</span> <span class="keyword">bool</span><span class="special">&gt;</span> <a name="id-1_3_46_10_1_1_1_41_1-bb"></a><span class="identifier">emplace</span><span class="special">(</span><span class="identifier">Args</span><span class="special">&amp;&amp;</span><span class="special">...</span> args<span class="special">)</span><span class="special">;</span></pre>
<p>Inserts an object, constructed with the arguments <code class="computeroutput">args</code>, in the container if and only if there is no element in the container with an equivalent value.</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Requires:</span></p></td>
<td><p><code class="computeroutput">value_type</code> is <code class="computeroutput">EmplaceConstructible</code> into
                  <code class="computeroutput">X</code> from <code class="computeroutput">args</code>.
                </p></td>
</tr>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td>
<p>The bool component of the return type is true if an insert took place.</p>
<p>If an insert took place, then the iterator points to the newly inserted element. Otherwise, it points to the element with equivalent value.</p>
</td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td><p>If an exception is thrown by an operation other than a call to <code class="computeroutput">hasher</code> the function has no effect.</p></td>
</tr>
<tr>
<td><p><span class="term">Notes:</span></p></td>
<td>
<p>Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.</p>
<p>Pointers and references to elements are never invalidated.</p>
<p>If the compiler doesn't support variadic template arguments or rvalue
                      references, this is emulated for up to 10 arguments, with no support
                      for rvalue references or move semantics.</p>
<p>Since existing <code class="computeroutput">std::pair</code> implementations don't support
                      <code class="computeroutput">std::piecewise_construct</code> this emulates it,
                      but using <code class="computeroutput">boost::unordered::piecewise_construct</code>.</p>
</td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span><span class="special">...</span> Args<span class="special">&gt;</span> 
  <span class="identifier">iterator</span> <a name="id-1_3_46_10_1_1_1_41_2-bb"></a><span class="identifier">emplace_hint</span><span class="special">(</span><span class="identifier">const_iterator</span> hint<span class="special">,</span> <span class="identifier">Args</span><span class="special">&amp;&amp;</span><span class="special">...</span> args<span class="special">)</span><span class="special">;</span></pre>
<p>Inserts an object, constructed with the arguments <code class="computeroutput">args</code>, in the container if and only if there is no element in the container with an equivalent value.</p>
<p><code class="computeroutput">hint</code> is a suggestion to where the element should be inserted.</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Requires:</span></p></td>
<td><p><code class="computeroutput">value_type</code> is <code class="computeroutput">EmplaceConstructible</code> into
                  <code class="computeroutput">X</code> from <code class="computeroutput">args</code>.
                </p></td>
</tr>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>If an insert took place, then the iterator points to the newly inserted element. Otherwise, it points to the element with equivalent value.</p></td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td><p>If an exception is thrown by an operation other than a call to <code class="computeroutput">hasher</code> the function has no effect.</p></td>
</tr>
<tr>
<td><p><span class="term">Notes:</span></p></td>
<td>
<p>The standard is fairly vague on the meaning of the hint. But the only practical way to use it, and the only way that Boost.Unordered supports is to point to an existing element with the same value. </p>
<p>Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.</p>
<p>Pointers and references to elements are never invalidated.</p>
<p>If the compiler doesn't support variadic template arguments or rvalue
                      references, this is emulated for up to 10 arguments, with no support
                      for rvalue references or move semantics.</p>
<p>Since existing <code class="computeroutput">std::pair</code> implementations don't support
                      <code class="computeroutput">std::piecewise_construct</code> this emulates it,
                      but using <code class="computeroutput">boost::unordered::piecewise_construct</code>.</p>
</td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">iterator</span><span class="special">,</span> <span class="keyword">bool</span><span class="special">&gt;</span> <a name="id-1_3_46_10_1_1_1_41_3-bb"></a><span class="identifier">insert</span><span class="special">(</span><span class="identifier">value_type</span> <span class="keyword">const</span><span class="special">&amp;</span> obj<span class="special">)</span><span class="special">;</span></pre>
<p>Inserts <code class="computeroutput">obj</code> in the container if and only if there is no element in the container with an equivalent value.</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Requires:</span></p></td>
<td><p><code class="computeroutput">value_type</code> is <code class="computeroutput">CopyInsertable</code>.</p></td>
</tr>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td>
<p>The bool component of the return type is true if an insert took place.</p>
<p>If an insert took place, then the iterator points to the newly inserted element. Otherwise, it points to the element with equivalent value.</p>
</td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td><p>If an exception is thrown by an operation other than a call to <code class="computeroutput">hasher</code> the function has no effect.</p></td>
</tr>
<tr>
<td><p><span class="term">Notes:</span></p></td>
<td>
<p>Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.</p>
<p>Pointers and references to elements are never invalidated.</p>
</td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">iterator</span><span class="special">,</span> <span class="keyword">bool</span><span class="special">&gt;</span> <a name="id-1_3_46_10_1_1_1_41_4-bb"></a><span class="identifier">insert</span><span class="special">(</span><span class="identifier">value_type</span><span class="special">&amp;&amp;</span> obj<span class="special">)</span><span class="special">;</span></pre>
<p>Inserts <code class="computeroutput">obj</code> in the container if and only if there is no element in the container with an equivalent value.</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Requires:</span></p></td>
<td><p><code class="computeroutput">value_type</code> is <code class="computeroutput">MoveInsertable</code>.</p></td>
</tr>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td>
<p>The bool component of the return type is true if an insert took place.</p>
<p>If an insert took place, then the iterator points to the newly inserted element. Otherwise, it points to the element with equivalent value.</p>
</td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td><p>If an exception is thrown by an operation other than a call to <code class="computeroutput">hasher</code> the function has no effect.</p></td>
</tr>
<tr>
<td><p><span class="term">Notes:</span></p></td>
<td>
<p>Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.</p>
<p>Pointers and references to elements are never invalidated.</p>
</td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">iterator</span> <a name="id-1_3_46_10_1_1_1_41_5-bb"></a><span class="identifier">insert</span><span class="special">(</span><span class="identifier">const_iterator</span> hint<span class="special">,</span> <span class="identifier">value_type</span> <span class="keyword">const</span><span class="special">&amp;</span> obj<span class="special">)</span><span class="special">;</span></pre>
<p>Inserts <code class="computeroutput">obj</code> in the container if and only if there is no element in the container with an equivalent value.</p>
<p>hint is a suggestion to where the element should be inserted.</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Requires:</span></p></td>
<td><p><code class="computeroutput">value_type</code> is <code class="computeroutput">CopyInsertable</code>.</p></td>
</tr>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>If an insert took place, then the iterator points to the newly inserted element. Otherwise, it points to the element with equivalent value.</p></td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td><p>If an exception is thrown by an operation other than a call to <code class="computeroutput">hasher</code> the function has no effect.</p></td>
</tr>
<tr>
<td><p><span class="term">Notes:</span></p></td>
<td>
<p>The standard is fairly vague on the meaning of the hint. But the only practical way to use it, and the only way that Boost.Unordered supports is to point to an existing element with the same value. </p>
<p>Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.</p>
<p>Pointers and references to elements are never invalidated.</p>
</td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">iterator</span> <a name="id-1_3_46_10_1_1_1_41_6-bb"></a><span class="identifier">insert</span><span class="special">(</span><span class="identifier">const_iterator</span> hint<span class="special">,</span> <span class="identifier">value_type</span><span class="special">&amp;&amp;</span> obj<span class="special">)</span><span class="special">;</span></pre>
<p>Inserts <code class="computeroutput">obj</code> in the container if and only if there is no element in the container with an equivalent value.</p>
<p>hint is a suggestion to where the element should be inserted.</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Requires:</span></p></td>
<td><p><code class="computeroutput">value_type</code> is <code class="computeroutput">MoveInsertable</code>.</p></td>
</tr>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>If an insert took place, then the iterator points to the newly inserted element. Otherwise, it points to the element with equivalent value.</p></td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td><p>If an exception is thrown by an operation other than a call to <code class="computeroutput">hasher</code> the function has no effect.</p></td>
</tr>
<tr>
<td><p><span class="term">Notes:</span></p></td>
<td>
<p>The standard is fairly vague on the meaning of the hint. But the only practical way to use it, and the only way that Boost.Unordered supports is to point to an existing element with the same value. </p>
<p>Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.</p>
<p>Pointers and references to elements are never invalidated.</p>
</td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <a class="link" href="../InputIterator.html" title="Concept InputIterator">InputIterator</a><span class="special">&gt;</span> 
  <span class="keyword">void</span> <a name="id-1_3_46_10_1_1_1_41_7-bb"></a><span class="identifier">insert</span><span class="special">(</span><span class="identifier">InputIterator</span> first<span class="special">,</span> <span class="identifier">InputIterator</span> last<span class="special">)</span><span class="special">;</span></pre>
<p>Inserts a range of elements into the container.
                Elements are inserted if and only if there is no element in the container with an equivalent value.
                </p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Requires:</span></p></td>
<td><p><code class="computeroutput">value_type</code> is <code class="computeroutput">EmplaceConstructible</code> into
                  <code class="computeroutput">X</code> from <code class="computeroutput">*first</code>.</p></td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td><p>When inserting a single element, if an exception is thrown by an operation other than a call to <code class="computeroutput">hasher</code> the function has no effect.</p></td>
</tr>
<tr>
<td><p><span class="term">Notes:</span></p></td>
<td>
<p>Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.</p>
<p>Pointers and references to elements are never invalidated.</p>
</td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="id-1_3_46_10_1_1_1_41_8-bb"></a><span class="identifier">insert</span><span class="special">(</span><span class="identifier">initializer_list</span><span class="special">&lt;</span><span class="identifier">value_type</span><span class="special">&gt;</span> il<span class="special">)</span><span class="special">;</span></pre>
<p>Inserts a range of elements into the container.
                                Elements are inserted if and only if there is no element in the container with an equivalent value.
                                </p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Requires:</span></p></td>
<td><p><code class="computeroutput">value_type</code> is <code class="computeroutput">EmplaceConstructible</code> into
                  <code class="computeroutput">X</code> from <code class="computeroutput">*first</code>.</p></td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td><p>When inserting a single element, if an exception is thrown by an operation other than a call to <code class="computeroutput">hasher</code> the function has no effect.</p></td>
</tr>
<tr>
<td><p><span class="term">Notes:</span></p></td>
<td>
<p>Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.</p>
<p>Pointers and references to elements are never invalidated.</p>
</td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="id-1_3_46_10_1_1_1_41_9-bb"></a><span class="identifier">insert</span><span class="special">(</span><span class="identifier">initializer_list</span><span class="special">&lt;</span><span class="identifier">value_type</span><span class="special">&gt;</span> il<span class="special">)</span><span class="special">;</span></pre>
<p>Inserts a range of elements into the container. Elements are inserted if and only if there is no element in the container with an equivalent value.</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Requires:</span></p></td>
<td><p><code class="computeroutput">value_type</code> is <code class="computeroutput">EmplaceConstructible</code> into
                  <code class="computeroutput">X</code> from <code class="computeroutput">*first</code>.</p></td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td><p>When inserting a single element, if an exception is thrown by an operation other than a call to <code class="computeroutput">hasher</code> the function has no effect.</p></td>
</tr>
<tr>
<td><p><span class="term">Notes:</span></p></td>
<td>
<p>Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.</p>
<p>Pointers and references to elements are never invalidated.</p>
</td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">node_type</span> <a name="id-1_3_46_10_1_1_1_41_10-bb"></a><span class="identifier">extract</span><span class="special">(</span><span class="identifier">const_iterator</span> position<span class="special">)</span><span class="special">;</span></pre>
<p>Removes the element pointed to by <code class="computeroutput">position</code>.</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>A <code class="computeroutput">node_type</code> owning the element.</p></td>
</tr>
<tr>
<td><p><span class="term">Notes:</span></p></td>
<td><p>
                  In C++17 a node extracted using this method can be inserted into a compatible <code class="computeroutput">unordered_multiset</code>,
                  but that is not supported yet.
                </p></td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">node_type</span> <a name="id-1_3_46_10_1_1_1_41_11-bb"></a><span class="identifier">extract</span><span class="special">(</span><span class="identifier">key_type</span> <span class="keyword">const</span><span class="special">&amp;</span> k<span class="special">)</span><span class="special">;</span></pre>
<p>Removes an element with key equivalent to <code class="computeroutput">k</code>.</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>A <code class="computeroutput">node_type</code> owning the element if found, otherwise an empty <code class="computeroutput">node_type</code>.</p></td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td><p>Only throws an exception if it is thrown by <code class="computeroutput">hasher</code> or <code class="computeroutput">key_equal</code>.</p></td>
</tr>
<tr>
<td><p><span class="term">Notes:</span></p></td>
<td><p>
                  In C++17 a node extracted using this method can be inserted into a compatible <code class="computeroutput">unordered_multiset</code>,
                  but that is not supported yet.
                </p></td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">insert_return_type</span> <a name="id-1_3_46_10_1_1_1_41_12-bb"></a><span class="identifier">insert</span><span class="special">(</span><span class="identifier">node_type</span><span class="special">&amp;&amp;</span> nh<span class="special">)</span><span class="special">;</span></pre>
<p>If <code class="computeroutput">nh</code> is empty, has no affect.</p>
<p>Otherwise inserts the element owned by <code class="computeroutput">nh</code>
                      if and only if there is no element in the container with an equivalent value.
                </p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Requires:</span></p></td>
<td><p><code class="computeroutput">nh</code> is empty or <code class="computeroutput">nh.get_allocator()</code> is equal to the container's allocator.</p></td>
</tr>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td>
<p>If <code class="computeroutput">nh</code> was empty, returns an <code class="computeroutput">insert_return_type</code> with:
                      <code class="computeroutput">inserted</code> equal to <code class="computeroutput">false</code>,
                      <code class="computeroutput">position</code> equal to <code class="computeroutput">end()</code> and
                      <code class="computeroutput">node</code> empty.</p>
<p>Otherwise if there was already an element with an equivalent key, returns an <code class="computeroutput">insert_return_type</code> with:
                      <code class="computeroutput">inserted</code> equal to <code class="computeroutput">false</code>,
                      <code class="computeroutput">position</code> pointing to a matching element and
                      <code class="computeroutput">node</code> contains the node from <code class="computeroutput">nh</code>.</p>
<p>Otherwise if the insertion succeeded, returns an <code class="computeroutput">insert_return_type</code> with:
                      <code class="computeroutput">inserted</code> equal to <code class="computeroutput">true</code>,
                      <code class="computeroutput">position</code> pointing to the newly inserted element and
                      <code class="computeroutput">node</code> empty.</p>
</td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td><p>If an exception is thrown by an operation other than a call to <code class="computeroutput">hasher</code> the function has no effect.</p></td>
</tr>
<tr>
<td><p><span class="term">Notes:</span></p></td>
<td>
<p>Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.</p>
<p>Pointers and references to elements are never invalidated.</p>
<p>In C++17 this can be used to insert a node extracted from a compatible <code class="computeroutput">unordered_multiset</code>,
                    but that is not supported yet.</p>
</td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">iterator</span> <a name="id-1_3_46_10_1_1_1_41_13-bb"></a><span class="identifier">insert</span><span class="special">(</span><span class="identifier">const_iterator</span> hint<span class="special">,</span> <span class="identifier">node_type</span><span class="special">&amp;&amp;</span> nh<span class="special">)</span><span class="special">;</span></pre>
<p>If <code class="computeroutput">nh</code> is empty, has no affect.</p>
<p>Otherwise inserts the element owned by <code class="computeroutput">nh</code>
                      if and only if there is no element in the container with an equivalent value.
                </p>
<p>If there is already an element in the container with an equivalent value                      has no effect on <code class="computeroutput">nh</code> (i.e. <code class="computeroutput">nh</code> still contains the node.)</p>
<p>hint is a suggestion to where the element should be inserted.</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Requires:</span></p></td>
<td><p><code class="computeroutput">nh</code> is empty or <code class="computeroutput">nh.get_allocator()</code> is equal to the container's allocator.</p></td>
</tr>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td>
<p>If <code class="computeroutput">nh</code> was empty returns <code class="computeroutput">end()</code>.</p>
<p>If there was already an element in the container with an equivalent value                      returns an iterator pointing to that.</p>
<p>Otherwise returns an iterator pointing to the newly inserted element.</p>
</td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td><p>If an exception is thrown by an operation other than a call to <code class="computeroutput">hasher</code> the function has no effect.</p></td>
</tr>
<tr>
<td><p><span class="term">Notes:</span></p></td>
<td>
<p>The standard is fairly vague on the meaning of the hint. But the only practical way to use it, and the only way that Boost.Unordered supports is to point to an existing element with the same value. </p>
<p>Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.</p>
<p>Pointers and references to elements are never invalidated.</p>
<p>In C++17 this can be used to insert a node extracted from a compatible <code class="computeroutput">unordered_multiset</code>,
                    but that is not supported yet.</p>
</td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">iterator</span> <a name="id-1_3_46_10_1_1_1_41_14-bb"></a><span class="identifier">erase</span><span class="special">(</span><span class="identifier">const_iterator</span> position<span class="special">)</span><span class="special">;</span></pre>
<p>Erase the element pointed to by <code class="computeroutput">position</code>.</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>The iterator following <code class="computeroutput">position</code> before the erasure.</p></td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td><p>Only throws an exception if it is thrown by <code class="computeroutput">hasher</code> or <code class="computeroutput">key_equal</code>.</p></td>
</tr>
<tr>
<td><p><span class="term">Notes:</span></p></td>
<td><p>
                  In older versions this could be inefficient because it had to search
                  through several buckets to find the position of the returned iterator.
                  The data structure has been changed so that this is no longer the case,
                  and the alternative erase methods have been deprecated.
                </p></td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">size_type</span> <a name="id-1_3_46_10_1_1_1_41_15-bb"></a><span class="identifier">erase</span><span class="special">(</span><span class="identifier">key_type</span> <span class="keyword">const</span><span class="special">&amp;</span> k<span class="special">)</span><span class="special">;</span></pre>
<p>Erase all elements with key equivalent to <code class="computeroutput">k</code>.</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>The number of elements erased.</p></td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td><p>Only throws an exception if it is thrown by <code class="computeroutput">hasher</code> or <code class="computeroutput">key_equal</code>.</p></td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">iterator</span> <a name="id-1_3_46_10_1_1_1_41_16-bb"></a><span class="identifier">erase</span><span class="special">(</span><span class="identifier">const_iterator</span> first<span class="special">,</span> <span class="identifier">const_iterator</span> last<span class="special">)</span><span class="special">;</span></pre>
<p>Erases the elements in the range from <code class="computeroutput">first</code> to <code class="computeroutput">last</code>.</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>The iterator following the erased elements - i.e. <code class="computeroutput">last</code>.</p></td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td>
<p>Only throws an exception if it is thrown by <code class="computeroutput">hasher</code> or <code class="computeroutput">key_equal</code>.</p>
<p>In this implementation, this overload doesn't call either function object's methods so it is no throw, but this might not be true in other implementations.</p>
</td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="id-1_3_46_10_1_1_1_41_17-bb"></a><span class="identifier">quick_erase</span><span class="special">(</span><span class="identifier">const_iterator</span> position<span class="special">)</span><span class="special">;</span></pre>
<p>Erase the element pointed to by <code class="computeroutput">position</code>.</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td>
<p>Only throws an exception if it is thrown by <code class="computeroutput">hasher</code> or <code class="computeroutput">key_equal</code>.</p>
<p>In this implementation, this overload doesn't call either function object's methods so it is no throw, but this might not be true in other implementations.</p>
</td>
</tr>
<tr>
<td><p><span class="term">Notes:</span></p></td>
<td><p>
                  This method was implemented because returning an iterator to
                  the next element from <code class="computeroutput">erase</code> was expensive, but
                  the container has been redesigned so that is no longer the
                  case. So this method is now deprecated.
                </p></td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="id-1_3_46_10_1_1_1_41_18-bb"></a><span class="identifier">erase_return_void</span><span class="special">(</span><span class="identifier">const_iterator</span> position<span class="special">)</span><span class="special">;</span></pre>
<p>Erase the element pointed to by <code class="computeroutput">position</code>.</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td>
<p>Only throws an exception if it is thrown by <code class="computeroutput">hasher</code> or <code class="computeroutput">key_equal</code>.</p>
<p>In this implementation, this overload doesn't call either function object's methods so it is no throw, but this might not be true in other implementations.</p>
</td>
</tr>
<tr>
<td><p><span class="term">Notes:</span></p></td>
<td><p>
                  This method was implemented because returning an iterator to
                  the next element from <code class="computeroutput">erase</code> was expensive, but
                  the container has been redesigned so that is no longer the
                  case. So this method is now deprecated.
                </p></td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="id-1_3_46_10_1_1_1_41_19-bb"></a><span class="identifier">clear</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>
<p>Erases all elements in the container.</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Postconditions:</span></p></td>
<td><p><code class="computeroutput"><a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_39_2-bb">size</a>() == 0</code></p></td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td><p>Never throws an exception.</p></td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="id-1_3_46_10_1_1_1_41_20-bb"></a><span class="identifier">swap</span><span class="special">(</span><span class="identifier">unordered_set</span><span class="special">&amp;</span><span class="special">)</span><span class="special">;</span></pre>
<p>Swaps the contents of the container with the parameter.</p>
<p>If <code class="computeroutput">Allocator::propagate_on_container_swap</code> is declared and
                  <code class="computeroutput">Allocator::propagate_on_container_swap::value</code> is true then the
                  containers' allocators are swapped. Otherwise, swapping with unequal allocators
                  results in undefined behavior.</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td><p>Doesn't throw an exception unless it is thrown by the copy constructor or copy assignment operator of <code class="computeroutput">key_equal</code> or <code class="computeroutput">hasher</code>.</p></td>
</tr>
<tr>
<td><p><span class="term">Notes:</span></p></td>
<td><p>The exception specifications aren't quite the same as the C++11 standard, as
                  the equality predieate and hash function are swapped using their copy constructors.</p></td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> H2<span class="special">,</span> <span class="keyword">typename</span> P2<span class="special">&gt;</span> 
   <a name="id-1_3_46_10_1_1_1_41_21-bb"></a><span class="identifier">merge</span><span class="special">(</span><span class="identifier">unordered_set</span><span class="special">&lt;</span><span class="identifier">Value</span><span class="special">,</span> <span class="identifier">H2</span><span class="special">,</span> <span class="identifier">P2</span><span class="special">,</span> <span class="identifier">Alloc</span><span class="special">&gt;</span><span class="special">&amp;</span> source<span class="special">)</span><span class="special">;</span></pre>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term">Notes:</span></p></td>
<td><p>Does not support merging with a compatible <code class="computeroutput">unordered_multiset</code> yet.</p></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> H2<span class="special">,</span> <span class="keyword">typename</span> P2<span class="special">&gt;</span> 
   <a name="id-1_3_46_10_1_1_1_41_22-bb"></a><span class="identifier">merge</span><span class="special">(</span><span class="identifier">unordered_set</span><span class="special">&lt;</span><span class="identifier">Value</span><span class="special">,</span> <span class="identifier">H2</span><span class="special">,</span> <span class="identifier">P2</span><span class="special">,</span> <span class="identifier">Alloc</span><span class="special">&gt;</span><span class="special">&amp;&amp;</span> source<span class="special">)</span><span class="special">;</span></pre>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term">Notes:</span></p></td>
<td><p>Does not support merging with a compatible <code class="computeroutput">unordered_multiset</code> yet.</p></td>
</tr></tbody>
</table></div>
</li>
</ol></div>
</div>
<div class="refsect2">
<a name="id-1.3.46.10.2.4.4.22"></a><h3>
<a name="id-1_3_46_10_1_1_1_42-bb"></a><code class="computeroutput">unordered_set</code> observers</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><span class="identifier">hasher</span> <a name="id-1_3_46_10_1_1_1_42_1-bb"></a><span class="identifier">hash_function</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term">Returns:</span></p></td>
<td>The container's hash function.
              </td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">key_equal</span> <a name="id-1_3_46_10_1_1_1_42_2-bb"></a><span class="identifier">key_eq</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term">Returns:</span></p></td>
<td>The container's key equality predicate.
              </td>
</tr></tbody>
</table></div>
</li>
</ol></div>
</div>
<div class="refsect2">
<a name="id-1.3.46.10.2.4.4.23"></a><h3>
<a name="id-1_3_46_10_1_1_1_43-bb"></a><code class="computeroutput">unordered_set</code> lookup</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><a name="id-1_3_46_10_1_1_1_43_1-bb"></a><span class="identifier">iterator</span> <a name="id-1_3_46_10_1_1_1_43_1_1-bb"></a><span class="identifier">find</span><span class="special">(</span><span class="identifier">key_type</span> <span class="keyword">const</span><span class="special">&amp;</span> k<span class="special">)</span><span class="special">;</span>
<span class="identifier">const_iterator</span> <a name="id-1_3_46_10_1_1_1_43_1_2-bb"></a><span class="identifier">find</span><span class="special">(</span><span class="identifier">key_type</span> <span class="keyword">const</span><span class="special">&amp;</span> k<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> CompatibleKey<span class="special">,</span> <span class="keyword">typename</span> CompatibleHash<span class="special">,</span> 
         <span class="keyword">typename</span> CompatiblePredicate<span class="special">&gt;</span> 
  <span class="identifier">iterator</span> <a name="id-1_3_46_10_1_1_1_43_1_3-bb"></a><span class="identifier">find</span><span class="special">(</span><span class="identifier">CompatibleKey</span> <span class="keyword">const</span><span class="special">&amp;</span> k<span class="special">,</span> <span class="identifier">CompatibleHash</span> <span class="keyword">const</span><span class="special">&amp;</span> hash<span class="special">,</span> 
                <span class="identifier">CompatiblePredicate</span> <span class="keyword">const</span><span class="special">&amp;</span> eq<span class="special">)</span><span class="special">;</span>
<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> CompatibleKey<span class="special">,</span> <span class="keyword">typename</span> CompatibleHash<span class="special">,</span> 
         <span class="keyword">typename</span> CompatiblePredicate<span class="special">&gt;</span> 
  <span class="identifier">const_iterator</span> 
  <a name="id-1_3_46_10_1_1_1_43_1_4-bb"></a><span class="identifier">find</span><span class="special">(</span><span class="identifier">CompatibleKey</span> <span class="keyword">const</span><span class="special">&amp;</span> k<span class="special">,</span> <span class="identifier">CompatibleHash</span> <span class="keyword">const</span><span class="special">&amp;</span> hash<span class="special">,</span> 
       <span class="identifier">CompatiblePredicate</span> <span class="keyword">const</span><span class="special">&amp;</span> eq<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>An iterator pointing to an element with key equivalent to <code class="computeroutput">k</code>, or <code class="computeroutput">b.end()</code> if no such element exists.</p></td>
</tr>
<tr>
<td><p><span class="term">Notes:</span></p></td>
<td><p>
                The templated overloads are a non-standard extensions which
                allows you to use a compatible hash function and equality
                predicate for a key of a different type in order to avoid
                an expensive type cast. In general, its use is not encouraged.
              </p></td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">size_type</span> <a name="id-1_3_46_10_1_1_1_43_2-bb"></a><span class="identifier">count</span><span class="special">(</span><span class="identifier">key_type</span> <span class="keyword">const</span><span class="special">&amp;</span> k<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>The number of elements with key equivalent to <code class="computeroutput">k</code>.</p></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><a name="id-1_3_46_10_1_1_1_43_3-bb"></a><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">iterator</span><span class="special">,</span> <span class="identifier">iterator</span><span class="special">&gt;</span> <a name="id-1_3_46_10_1_1_1_43_3_1-bb"></a><span class="identifier">equal_range</span><span class="special">(</span><span class="identifier">key_type</span> <span class="keyword">const</span><span class="special">&amp;</span> k<span class="special">)</span><span class="special">;</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">const_iterator</span><span class="special">,</span> <span class="identifier">const_iterator</span><span class="special">&gt;</span> <a name="id-1_3_46_10_1_1_1_43_3_2-bb"></a><span class="identifier">equal_range</span><span class="special">(</span><span class="identifier">key_type</span> <span class="keyword">const</span><span class="special">&amp;</span> k<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>A range containing all elements with key equivalent to <code class="computeroutput">k</code>.
                  If the container doesn't container any such elements, returns
                  <code class="computeroutput">std::make_pair(b.end(),b.end())</code>.
                  </p></td>
</tr></tbody>
</table></div>
</li>
</ol></div>
</div>
<div class="refsect2">
<a name="id-1.3.46.10.2.4.4.24"></a><h3>
<a name="id-1_3_46_10_1_1_1_44-bb"></a><code class="computeroutput">unordered_set</code> bucket interface</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><span class="identifier">size_type</span> <a name="id-1_3_46_10_1_1_1_44_1-bb"></a><span class="identifier">bucket_count</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>The number of buckets.</p></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">size_type</span> <a name="id-1_3_46_10_1_1_1_44_2-bb"></a><span class="identifier">max_bucket_count</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>An upper bound on the number of buckets.</p></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">size_type</span> <a name="id-1_3_46_10_1_1_1_44_3-bb"></a><span class="identifier">bucket_size</span><span class="special">(</span><span class="identifier">size_type</span> n<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Requires:</span></p></td>
<td><p><code class="computeroutput">n &lt; <a class="link" href="unordered_set.html#id-1_3_46_10_1_1_1_44_1-bb">bucket_count</a>()</code></p></td>
</tr>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>The number of elements in bucket <code class="computeroutput">n</code>.</p></td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">size_type</span> <a name="id-1_3_46_10_1_1_1_44_4-bb"></a><span class="identifier">bucket</span><span class="special">(</span><span class="identifier">key_type</span> <span class="keyword">const</span><span class="special">&amp;</span> k<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>The index of the bucket which would contain an element with key <code class="computeroutput">k</code>.</p></td>
</tr>
<tr>
<td><p><span class="term">Postconditions:</span></p></td>
<td><p>The return value is less than <code class="computeroutput">bucket_count()</code></p></td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><a name="id-1_3_46_10_1_1_1_44_5-bb"></a><span class="identifier">local_iterator</span> <a name="id-1_3_46_10_1_1_1_44_5_1-bb"></a><span class="identifier">begin</span><span class="special">(</span><span class="identifier">size_type</span> n<span class="special">)</span><span class="special">;</span>
<span class="identifier">const_local_iterator</span> <a name="id-1_3_46_10_1_1_1_44_5_2-bb"></a><span class="identifier">begin</span><span class="special">(</span><span class="identifier">size_type</span> n<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Requires:</span></p></td>
<td><p><code class="computeroutput">n</code> shall be in the range <code class="computeroutput">[0, bucket_count())</code>.</p></td>
</tr>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>A local iterator pointing the first element in the bucket with index <code class="computeroutput">n</code>.</p></td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><a name="id-1_3_46_10_1_1_1_44_6-bb"></a><span class="identifier">local_iterator</span> <a name="id-1_3_46_10_1_1_1_44_6_1-bb"></a><span class="identifier">end</span><span class="special">(</span><span class="identifier">size_type</span> n<span class="special">)</span><span class="special">;</span>
<span class="identifier">const_local_iterator</span> <a name="id-1_3_46_10_1_1_1_44_6_2-bb"></a><span class="identifier">end</span><span class="special">(</span><span class="identifier">size_type</span> n<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Requires:</span></p></td>
<td><p><code class="computeroutput">n</code> shall be in the range <code class="computeroutput">[0, bucket_count())</code>.</p></td>
</tr>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>A local iterator pointing the 'one past the end' element in the bucket with index <code class="computeroutput">n</code>.</p></td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">const_local_iterator</span> <a name="id-1_3_46_10_1_1_1_44_7-bb"></a><span class="identifier">cbegin</span><span class="special">(</span><span class="identifier">size_type</span> n<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Requires:</span></p></td>
<td><p><code class="computeroutput">n</code> shall be in the range <code class="computeroutput">[0, bucket_count())</code>.</p></td>
</tr>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>A constant local iterator pointing the first element in the bucket with index <code class="computeroutput">n</code>.</p></td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">const_local_iterator</span> <a name="id-1_3_46_10_1_1_1_44_8-bb"></a><span class="identifier">cend</span><span class="special">(</span><span class="identifier">size_type</span> n<span class="special">)</span><span class="special">;</span></pre>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Requires:</span></p></td>
<td><p><code class="computeroutput">n</code> shall be in the range <code class="computeroutput">[0, bucket_count())</code>.</p></td>
</tr>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>A constant local iterator pointing the 'one past the end' element in the bucket with index <code class="computeroutput">n</code>.</p></td>
</tr>
</tbody>
</table></div>
</li>
</ol></div>
</div>
<div class="refsect2">
<a name="id-1.3.46.10.2.4.4.25"></a><h3>
<a name="id-1_3_46_10_1_1_1_45-bb"></a><code class="computeroutput">unordered_set</code> hash policy</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><span class="keyword">float</span> <a name="id-1_3_46_10_1_1_1_45_1-bb"></a><span class="identifier">load_factor</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>The average number of elements per bucket.</p></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">float</span> <a name="id-1_3_46_10_1_1_1_45_2-bb"></a><span class="identifier">max_load_factor</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>Returns the current maximum load factor.</p></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="id-1_3_46_10_1_1_1_45_3-bb"></a><span class="identifier">max_load_factor</span><span class="special">(</span><span class="keyword">float</span> z<span class="special">)</span><span class="special">;</span></pre>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term">Effects:</span></p></td>
<td><p>Changes the container's maximum load factor, using <code class="computeroutput">z</code> as a hint.</p></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="id-1_3_46_10_1_1_1_45_4-bb"></a><span class="identifier">rehash</span><span class="special">(</span><span class="identifier">size_type</span> n<span class="special">)</span><span class="special">;</span></pre>
<p>Changes the number of buckets so that there at least <code class="computeroutput">n</code> buckets, and so that the load factor is less than the maximum load factor.</p>
<p>Invalidates iterators, and changes the order of elements. Pointers and references to elements are not invalidated.</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term">Throws:</span></p></td>
<td><p>The function has no effect if an exception is thrown, unless it is thrown by the container's hash function or comparison function.</p></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="id-1_3_46_10_1_1_1_45_5-bb"></a><span class="identifier">reserve</span><span class="special">(</span><span class="identifier">size_type</span> n<span class="special">)</span><span class="special">;</span></pre>
<p>Invalidates iterators, and changes the order of elements. Pointers and references to elements are not invalidated.</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term">Throws:</span></p></td>
<td><p>The function has no effect if an exception is thrown, unless it is thrown by the container's hash function or comparison function.</p></td>
</tr></tbody>
</table></div>
</li>
</ol></div>
</div>
<div class="refsect2">
<a name="id-1.3.46.10.2.4.4.26"></a><h3>
<a name="id-1_3_46_10_1_1_1_46-bb"></a><code class="computeroutput">unordered_set</code> Equality Comparisons</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Value<span class="special">,</span> <span class="keyword">typename</span> Hash<span class="special">,</span> <span class="keyword">typename</span> Pred<span class="special">,</span> <span class="keyword">typename</span> Alloc<span class="special">&gt;</span> 
  <span class="keyword">bool</span> <a name="boost.unordered_set.operator=="></a><span class="keyword">operator</span><span class="special">==</span><span class="special">(</span><span class="identifier">unordered_set</span><span class="special">&lt;</span><span class="identifier">Value</span><span class="special">,</span> <span class="identifier">Hash</span><span class="special">,</span> <span class="identifier">Pred</span><span class="special">,</span> <span class="identifier">Alloc</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;</span> x<span class="special">,</span> 
                  <span class="identifier">unordered_set</span><span class="special">&lt;</span><span class="identifier">Value</span><span class="special">,</span> <span class="identifier">Hash</span><span class="special">,</span> <span class="identifier">Pred</span><span class="special">,</span> <span class="identifier">Alloc</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;</span> y<span class="special">)</span><span class="special">;</span></pre>
<p>Return <code class="computeroutput">true</code> if <code class="computeroutput">x.size() ==
                y.size</code> and for every element in <code class="computeroutput">x</code>,
                there is an element in <code class="computeroutput">y</code> with the same
                for the same key, with an equal value (using
                <code class="computeroutput">operator==</code> to compare the value types).
                </p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term">Notes:</span></p></td>
<td>
<p>The behavior of this function was changed to match
                  the C++11 standard in Boost 1.48.</p>
<p>Behavior is undefined if the two containers don't have
                    equivalent equality predicates.</p>
</td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Value<span class="special">,</span> <span class="keyword">typename</span> Hash<span class="special">,</span> <span class="keyword">typename</span> Pred<span class="special">,</span> <span class="keyword">typename</span> Alloc<span class="special">&gt;</span> 
  <span class="keyword">bool</span> <a name="boost.unordered_set.operator!="></a><span class="keyword">operator</span><span class="special">!=</span><span class="special">(</span><span class="identifier">unordered_set</span><span class="special">&lt;</span><span class="identifier">Value</span><span class="special">,</span> <span class="identifier">Hash</span><span class="special">,</span> <span class="identifier">Pred</span><span class="special">,</span> <span class="identifier">Alloc</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;</span> x<span class="special">,</span> 
                  <span class="identifier">unordered_set</span><span class="special">&lt;</span><span class="identifier">Value</span><span class="special">,</span> <span class="identifier">Hash</span><span class="special">,</span> <span class="identifier">Pred</span><span class="special">,</span> <span class="identifier">Alloc</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;</span> y<span class="special">)</span><span class="special">;</span></pre>
<p>Return <code class="computeroutput">false</code> if <code class="computeroutput">x.size() ==
                y.size</code> and for every element in <code class="computeroutput">x</code>,
                there is an element in <code class="computeroutput">y</code> with the same
                for the same key, with an equal value (using
                <code class="computeroutput">operator==</code> to compare the value types).
                </p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term">Notes:</span></p></td>
<td>
<p>The behavior of this function was changed to match
                  the C++11 standard in Boost 1.48.</p>
<p>Behavior is undefined if the two containers don't have
                    equivalent equality predicates.</p>
</td>
</tr></tbody>
</table></div>
</li>
</ol></div>
</div>
<div class="refsect2">
<a name="id-1.3.46.10.2.4.4.27"></a><h3>
<a name="id-1_3_46_10_1_1_1_47-bb"></a><code class="computeroutput">unordered_set</code> swap</h3>
<div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Value<span class="special">,</span> <span class="keyword">typename</span> Hash<span class="special">,</span> <span class="keyword">typename</span> Pred<span class="special">,</span> <span class="keyword">typename</span> Alloc<span class="special">&gt;</span> 
  <span class="keyword">void</span> <a name="boost.unordered_set.swap"></a><span class="identifier">swap</span><span class="special">(</span><span class="identifier">unordered_set</span><span class="special">&lt;</span><span class="identifier">Value</span><span class="special">,</span> <span class="identifier">Hash</span><span class="special">,</span> <span class="identifier">Pred</span><span class="special">,</span> <span class="identifier">Alloc</span><span class="special">&gt;</span><span class="special">&amp;</span> x<span class="special">,</span> 
            <span class="identifier">unordered_set</span><span class="special">&lt;</span><span class="identifier">Value</span><span class="special">,</span> <span class="identifier">Hash</span><span class="special">,</span> <span class="identifier">Pred</span><span class="special">,</span> <span class="identifier">Alloc</span><span class="special">&gt;</span><span class="special">&amp;</span> y<span class="special">)</span><span class="special">;</span></pre>
<p>Swaps the contents of <code class="computeroutput">x</code> and <code class="computeroutput">y</code>.</p>
<p>If <code class="computeroutput">Allocator::propagate_on_container_swap</code> is declared and
                  <code class="computeroutput">Allocator::propagate_on_container_swap::value</code> is true then the
                  containers' allocators are swapped. Otherwise, swapping with unequal allocators
                  results in undefined behavior.</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Effects:</span></p></td>
<td><p><code class="computeroutput">x.swap(y)</code></p></td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td><p>Doesn't throw an exception unless it is thrown by the copy constructor or copy assignment operator of <code class="computeroutput">key_equal</code> or <code class="computeroutput">hasher</code>.</p></td>
</tr>
<tr>
<td><p><span class="term">Notes:</span></p></td>
<td><p>The exception specifications aren't quite the same as the C++11 standard, as
                  the equality predieate and hash function are swapped using their copy constructors.</p></td>
</tr>
</tbody>
</table></div>
</li></ol></div>
</div>
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2003, 2004 Jeremy B. Maitin-Shepard<br>Copyright © 2005-2008 Daniel
      James<p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
      </p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="unordered/node_handle_set.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../unordered/reference.html#header.boost.unordered_set_hpp"><img src="../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="unordered_multiset.html"><img src="../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
